package com.ms.auction.common.module.deal;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 交易
 * </p>
 *
 * @author MaHC
 * @since 2019-07-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="TransLog对象", description="交易")
public class TransLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "订单编号")
    @TableField("order_number")
    private String orderNumber;

    @ApiModelProperty(value = "卖场id")
    @TableField("field_id")
    private Integer fieldId;

    @ApiModelProperty(value = "商品id")
    @TableField("goods_id")
    private Integer goodsId;

    @ApiModelProperty(value = "交易发起者")
    @TableField("subject")
    private Integer subject;

    @ApiModelProperty(value = "账户类型")
    @TableField("account_type")
    private Integer accountType;

    @ApiModelProperty(value = "账户号")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "银行卡id")
    @TableField("bank_id")
    private Integer bankId;

    @ApiModelProperty(value = "银行名称")
    @TableField("bank_name")
    private String bankName;

    @ApiModelProperty(value = "银行卡卡号")
    @TableField("bank_card_no")
    private String bankCardNo;

    @ApiModelProperty(value = "交易通道")
    @TableField("channel")
    private String channel;

    @ApiModelProperty(value = "支付子类型 app-APP支付  h5-H5支付   mp-公众号支付")
    @TableField("child_channel")
    private String childChannel;

    @ApiModelProperty(value = "交易编号(第三方支付交易编号)")
    @TableField("trans_code")
    private String transCode;

    @ApiModelProperty(value = "三方支付状态 0-待支付 1-支付成功 2-支付失败 3-待退款 4-已退款 5-退款中")
    @TableField("trans_status")
    private Integer transStatus;

    @ApiModelProperty(value = "支付标记:{0:支出,1:收入}")
    @TableField("trans_sign")
    private Integer transSign;

    @ApiModelProperty(value = "交易类型 1-充值  2-提现 3-消费保证金 4-返还保证金 5-支付佣金 6-首次拍卖 7-再次拍卖 8-佣金分润 9-利润分成  10-订单支付")
    @TableField("trans_type")
    private Integer transType;

    @ApiModelProperty(value = "当前出价")
    @TableField("current_bid")
    private BigDecimal currentBid;

    @ApiModelProperty(value = "定金金额/保证金")
    @TableField("bond")
    private BigDecimal bond;

    @ApiModelProperty(value = "佣金")
    @TableField("commission")
    private BigDecimal commission;

    @ApiModelProperty(value = "交易金额")
    @TableField("amount")
    private BigDecimal amount;

    @ApiModelProperty(value = "手续费")
    @TableField("fee")
    private BigDecimal fee;

    @ApiModelProperty(value = "优惠id")
    @TableField("coupons_id")
    private Integer couponsId;

    @ApiModelProperty(value = "优惠金额")
    @TableField("coupons")
    private BigDecimal coupons;

    @ApiModelProperty(value = "优惠类型")
    @TableField("coupons_type")
    private Integer couponsType;

    @ApiModelProperty(value = "实际支付金额")
    @TableField("pay_amount")
    private BigDecimal payAmount;

    @ApiModelProperty(value = "订单地址id")
    @TableField("address_id")
    private Integer addressId;

    @ApiModelProperty(value = "交易状态：0，未审核，1，成功 2，失败 3，待支付")
    @TableField("status")
    @TableLogic
    private Integer status;

    @ApiModelProperty(value = "备注字段")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "乐观锁标志")
    @TableField("version")
    @Version
    private Integer version;


}
